
//服务器与客户端协议号对应表
class Protocol {
    //public static Root: protobuf.Root = new protobuf.Root()
	//public static All = {}
    //public static MSG_LoginRequest = new ProtocolType()
		public static MSG_LoginRequest_CS_Index = 19
	public static MSG_LoginResponse_SC_Index = 20
	public static MSG_PingGameService_Index = 5
	public static MSG_PongGameService_Index = 6
	public static MSG_QuickStarGame_CS_Index = 21
	public static MSG_QuickStarGame_SC_Index = 22
	public static MSG_JoinGame_CS_Index = 23
	public static MSG_GameTerrainData_SC_Index = 24
	public static MSG_GameUserData_SC_Index = 25
	public static MSG_GameData_SC_Index = 26
	public static MSG_UpdateUserTransfrom_SC_Index = 27
	public static MSG_RemoveUser_SC_Index = 28
	public static MSG_OperationUserMove_CS_Index = 29
	public static MSG_OperationUserSkill_CS_Index = 30
	public static MSG_FinishGame_SC_Index = 31
	public static MSG_Ping_Index = 3
	public static MSG_Pong_Index = 4
	public static MSG_ForwardToUser_Index = 7


    public static LoadAllProtobuf(handleMgr: core.IMessageHandleMgr) {
    	//handleMgr.RegisterEncodeDecode(Protocol.MSG_RoomUserInfo_Index, msg.MSG_RoomUserInfo.decode, msg.MSG_RoomUserInfo.encode)
        //Protocol.MSG_LoginRequest.Index = 1
        //Protocol.MSG_LoginRequest.Name = "msg.MSG_LoginRequest"
        //Protocol.MSG_LoginRequest.Proto = Protocol.Root.lookupType(Protocol.MSG_LoginRequest.Name)
		
	handleMgr.RegisterEncodeDecode(Protocol.MSG_LoginRequest_CS_Index, msg.MSG_LoginRequest_CS.decode, msg.MSG_LoginRequest_CS.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_LoginResponse_SC_Index, msg.MSG_LoginResponse_SC.decode, msg.MSG_LoginResponse_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_PingGameService_Index, msg.MSG_PingGameService.decode, msg.MSG_PingGameService.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_PongGameService_Index, msg.MSG_PongGameService.decode, msg.MSG_PongGameService.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_QuickStarGame_CS_Index, msg.MSG_QuickStarGame_CS.decode, msg.MSG_QuickStarGame_CS.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_QuickStarGame_SC_Index, msg.MSG_QuickStarGame_SC.decode, msg.MSG_QuickStarGame_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_JoinGame_CS_Index, msg.MSG_JoinGame_CS.decode, msg.MSG_JoinGame_CS.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_GameTerrainData_SC_Index, msg.MSG_GameTerrainData_SC.decode, msg.MSG_GameTerrainData_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_GameUserData_SC_Index, msg.MSG_GameUserData_SC.decode, msg.MSG_GameUserData_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_GameData_SC_Index, msg.MSG_GameData_SC.decode, msg.MSG_GameData_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_UpdateUserTransfrom_SC_Index, msg.MSG_UpdateUserTransfrom_SC.decode, msg.MSG_UpdateUserTransfrom_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_RemoveUser_SC_Index, msg.MSG_RemoveUser_SC.decode, msg.MSG_RemoveUser_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_OperationUserMove_CS_Index, msg.MSG_OperationUserMove_CS.decode, msg.MSG_OperationUserMove_CS.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_OperationUserSkill_CS_Index, msg.MSG_OperationUserSkill_CS.decode, msg.MSG_OperationUserSkill_CS.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_FinishGame_SC_Index, msg.MSG_FinishGame_SC.decode, msg.MSG_FinishGame_SC.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_Ping_Index, msg.MSG_Ping.decode, msg.MSG_Ping.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_Pong_Index, msg.MSG_Pong.decode, msg.MSG_Pong.encode)

	handleMgr.RegisterEncodeDecode(Protocol.MSG_ForwardToUser_Index, msg.MSG_ForwardToUser.decode, msg.MSG_ForwardToUser.encode)

    }
}
